.y-dialog-container
  .y-dialog.y-create-model-dialog(data-dialog-width='-1' data-dialog-height='-1')
    .y-dialog-title-bar
      .y-dialog-title(data-bind='text:title')
      .y-dialog-exit(data-bind='click:cancel')
        i.fa.fa-times 
    .y-dialog-body
      .y-dialog-margin
        // ko if:isAlgorithmSelectionMode
        .y-algorithms
          h1 Select Algorithm
          table.table.table-condensed.table-hover
            tbody
              // ko foreach:algorithms
              tr
                td
                  .y-algorithm(data-bind='click:select')
                    .y-algorithm-title(data-bind='text:title')
              // /ko
        .y-model-actions
          button.btn(data-bind='click:cancel') Cancel
        // /ko


        // ko if:isModelCreationMode
        .y-dialog-content
          // ko with:modelForm
          h1(data-bind='text:title')

          // ko with:validationError
          .y-validation-error.bg-danger.y-monospace
            div Please fix these errors and try again:
            .y-validation-error-message(data-bind='text:message')
          // /ko

          h2(data-bind='collapse:false') Parameters
          table.table.table-condensed.table-striped
            tbody(data-bind='template: { name: parameterTemplateOf, foreach:criticalControls }')
          h2(data-bind='collapse:false') Advanced
          table.table.table-condensed.table-striped
            tbody(data-bind='template: { name: parameterTemplateOf, foreach:secondaryControls }')
          h2(data-bind='collapse:false') Expert
          table.table.table-condensed.table-striped
            tbody(data-bind='template: { name: parameterTemplateOf, foreach:expertControls }')
          // /ko
        .y-model-actions(style='width:50%;text-align:left')
          // ko if:canChangeAlgorithm
          button.btn(data-bind='click:backToAlgorithms')
            i.fa.fa-arrow-left
            span &nbsp;Back
          // /ko
        .y-model-actions(style='width:50%;left:50%')
          button.btn(data-bind='click:cancel') Cancel
          button.btn.btn-primary(data-bind='click:createModel') Create Model
        // /ko



